<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html lang="zh-CN">
  
  <head>
    
    <%@ include file="/WEB-INF/include/meta.jsp"%>
    <%@ include file="/WEB-INF/include/css.jsp"%>
    
  </head>
  <!-- end header -->
  <body>
    <div class="page-group">
      <div class="page page-current">
        <header class="bar student-bar bar-black">
          <a href="${ctx.host}" class="icon icon-left pull-left back"></a>
          <h1 class="student-title">课时评分</h1>
        </header>
        
        <div class="bar bar-header-secondary  bar-tab">
         <a class="tab-item student external fs-tab ${grade ? '' : 'active'}" href="${ctx.host}/ungraded-schedules${grade ? '?grade=false' : ''}">未评分</a>
         <a class="tab-item student external fs-tab ${grade ? 'active' : ''}" href="${ctx.host}/ungraded-schedules${grade ? '' : '?grade=true'}">已评分</a>
        </div>
        
        <div class="content" style="margin-top: ${fn:length(courseSchedules) > 0 ? 0 : 2.2}rem;">
          <c:choose>
            <c:when test="${fn:length(courseSchedules) > 0}">
              <div class="list-block hour-list no-margin">
                <c:forEach var="courseSchedule" items="${courseSchedules}">
                  <a href="${ctx.host }/ungraded-schedules/${courseSchedule.id}/grade" class="item-content item-link">
                    <div class="item-inner">
                      <div class="item-title" style="width: 100%;"><small>${courseSchedule.course.name} ${courseSchedule.site.name}</small><span class="pull-right" style="font-size: .7rem;">${courseSchedule.student.name}/${courseSchedule.student.mobile}</span><br /><span class="pull-right" style="font-size: .6rem;color: #F75658;">${courseSchedule.occurDate} ${courseSchedule.occurHour}</span></div>
                    </div>
                  </a>
                </c:forEach>
              </div>
            </c:when>
            <c:otherwise>
              <p class="text-center">暂无${grade ? '已' : '未'}评分课时</p>
            </c:otherwise>
          </c:choose>
          
          <!-- end hour list -->
          
        </div>
        
      </div>
    </div>
    
    <%@ include file="/WEB-INF/include/script.jsp"%>
    
  </body>
</html>